from django.db import models

# Create your models here.
class Question(models.Model):
    QTYPE = [('0','填空题'),('1','单选题'),('2','判断题'),('3','论述题')]
    title = models.CharField(max_length=255, null=False, unique=True)
    qtype = models.CharField(max_length=1, choices=QTYPE)
    option1 = models.CharField(max_length=255)
    option2 = models.CharField(max_length=255)
    option3 = models.CharField(max_length=255)
    option4 = models.CharField(max_length=255)
    # 参考答案
    ref_answer = models.CharField(max_length=255)
    #   解析
    analysis = models.TextField(null=False, default='')
    create_time = models.DateTimeField(auto_now_add=True)
    update_time = models.DateTimeField(auto_now=True)